﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="ClientBookingNoteList.aspx.cs" Inherits="BookingNote_ClientBookingNoteList"
    Title="托运单列表" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="title">
                <asp:Label ID="lblTitle" runat="server" Text="托运单信息列表"></asp:Label></div>
            <table class="add_table" cellspacing="1" cellpadding="3">
                <tr>
                    <td align="right">
                        <asp:Label ID="lblPONO" runat="server" Text="单号 ："></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtSelPONO" runat="server"></asp:TextBox>
                    </td>
                    <td align="right">
                        <asp:Label ID="lblInvoiceNO" runat="server" Text="发票号："></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtInvoiceNO" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="lblStatus" runat="server" Text="状态："></asp:Label>
                    </td>
                    <td>
                        <asp:RadioButton ID="radAll" runat="server" Text="全部" Checked="true" GroupName="status" />
                        <asp:RadioButton ID="radInput" runat="server" Text="录入" GroupName="status" /><asp:RadioButton
                            ID="radCheck" runat="server" Text="审核" GroupName="status" /><asp:RadioButton ID="radCancel"
                                runat="server" Text="取消" GroupName="status" />
                    </td>
                    <td colspan="2">
                        <asp:Button ID="btnSearch" runat="server" CssClass="btn" Text="搜索" OnClick="btnSearch_Click" />
                    </td>
                </tr>
            </table>
            <div id="divEntrust" runat="server">
                <div class="list_title">
                    <div class="autoleft">
                        <asp:Label ID="lblSelectOut" runat="server" Text="检索出"></asp:Label><asp:Label ID="lblTotal"
                            runat="server"></asp:Label>
                        <asp:Label ID="lblSelectOut2" runat="server" Text="个托运单"></asp:Label></div>
                    <div class="autoright">
                        <asp:Label ID="lblPerPage" runat="server" Text="每页显示："></asp:Label>
                        <asp:DropDownList ID="ddlPages" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlPages_SelectedIndexChanged">
                            <asp:ListItem Selected="True" Text="10" Value="10"></asp:ListItem>
                            <asp:ListItem Text="15" Value="15"></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                </div>
                <asp:GridView ID="gvBookNoteList" runat="server" AllowPaging="True" PageSize="10"
                    AutoGenerateColumns="false" Width="100%" AllowSorting="true" PagerSettings-Mode="NumericFirstLast"
                    OnPageIndexChanging="gvBookNoteList_PageIndexChanging"  OnSorting="gvBookNoteList_Sorting">
                    <PagerTemplate>
                        <table style="width: 100%">
                            <tr>
                                <td>
                                    <asp:Label ID="lblPerPage" runat="server" Text="页次"></asp:Label>:&nbsp;<asp:Label
                                        ID="Label1" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex+1      %>'></asp:Label>/<asp:Label
                                            ID="Label2" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageCount %>'></asp:Label><asp:Label
                                                ID="lblPage" runat="server" Text="页"></asp:Label>&nbsp;
                                    <asp:Label ID="lblTotalPages" runat="server" Text="总计"></asp:Label>:&nbsp;<asp:Label
                                        ID="Label3" runat="server" Text="<%# ((System.Data.DataView)gvBookNoteList.DataSource).Count %>"></asp:Label>
                                </td>
                                <td align="right">
                                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Page" CommandArgument="First"
                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>" Text="首页"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="Prev" CommandName="Page"
                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>" Text="前页"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Page" CommandArgument="Next"
                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>"
                                        Text="后页"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton4" runat="server" CommandArgument="Last" CommandName="Page"
                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>"
                                        Text="尾页"></asp:LinkButton>&nbsp;
                                    <asp:Label ID="lblTurnOn" runat="server" Text="转第"></asp:Label><asp:TextBox ID="txtPages"
                                        runat="server" Width="35px"></asp:TextBox>
                                    <asp:Label ID="lblPages2" runat="server" Text="页"></asp:Label>
                                    <asp:LinkButton ID="lbtnGo" runat="server" Text="提交" OnClick="lbtnGo_Click"></asp:LinkButton>
                                </td>
                            </tr>
                        </table>
                    </PagerTemplate>
                    <Columns>
                        <asp:TemplateField HeaderText="单号" SortExpression="PoNO">
                            <ItemTemplate>
                                <asp:Label ID="lblPoNO" runat="server" Text='<%# Eval("PoNO")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="发票号" SortExpression="InvoiceNO">
                            <ItemTemplate>
                                <asp:Label ID="lblInvoiceNO" runat="server" Text='<%# Eval("InvoiceNO")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="装货单">
                            <ItemTemplate>
                                <asp:Label ID="lblPcNO" runat="server" Text='<%# Eval("PcNO")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="状态">
                            <ItemTemplate>
                                <asp:Label ID="lblStatus" runat="server" Text='<%# HK2009.Common.StringUtil.GetBnStatus(Eval("Status"))%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="详情">
                            <ItemTemplate>
                                <a href="ClientBookingNoteLook.aspx?BookingNoteID=<%# Eval("PKID")%>">
                                    <asp:Label ID="lblLook" runat="server" Text="查看"></asp:Label></a>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle HorizontalAlign="Center" />
                    <RowStyle HorizontalAlign="Center" />
                </asp:GridView>
            </div>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
